evaluate

abstract fun evaluate(expression: String): XPathResult

Evaluates the given XPath expression for the node and returns the XPathResult of the ANY type.

Parameters

expression

a string representing the XPath to be evaluated

See also

Throws

when expression is empty

when this method failed to evaluate the given expression

when this node is closed


abstract fun evaluate(expression: String, type: XPathResultType): XPathResult

Evaluates the given XPath expression for the node and returns the XPathResult object of the given type.

Parameters

expression

a string representing the XPath to be evaluated

type

type of XPathResult to return

See also

XPathResultType

Throws

when expression is empty or blank

when this method failed to evaluate the given expression and return a result of the given type

when this node is closed